﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace M.Web
{
	/// <summary>
	/// 用于Ajax请求返回的通用HttpResult
	/// </summary>
	public class AjaxHttpResult
	{
		/// <summary>
		/// 用于Ajax请求返回的通用HttpResult
		/// </summary>
		public AjaxHttpResult()
		{

		}
		/// <summary>
		/// 用于Ajax请求返回的通用HttpResult
		/// </summary>
		/// <param name="result">处理是否正确</param>
		/// <param name="userData">正确则包含用户对象，错误则应传入错误信息</param>
		public AjaxHttpResult(bool result, object userData)
		{
			this.Result = result;
			this.UserData = userData;
		}
		/// <summary>
		/// 请求是否成功
		/// </summary>
		public bool Result { get; set; }
		/// <summary>
		/// 请求中包含的用户数据
		/// </summary>
		public object UserData { get; set; }
	}
}
